package com.asd.map.mapper;

import com.asd.map.entity.Point_style;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.*;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * @author
 * @createtime 2021-09-02 8:47
 * @description
 */
@Mapper
@Component
public interface Point_styleMapper extends BaseMapper<Point_style> {

    @Delete("delete from point_style where applyId=#{applyId} AND did =#{did}")
    void removeById(@Param("applyId") String applyId,@Param("did") String did);

    @Select("select * from point_style where applyId=#{applyId} AND did=#{did}")
    List<Point_style> findByApplyId(@Param("applyId") String applyId,@Param("did")String did);

    @Delete("delete from point_style where applyId = #{applyId}")
    void deleteByApplyId(@Param("applyId")String applyId);

    @Select("select * from point_style where applyId = #{id}")
    List<Point_style> getByApplyId(@Param("id")String id);

    @Update("update point_style set size =#{size}, color =#{color} where id =#{id} ")
    void updateStyleById(@Param("id")String id, @Param("size")String size, @Param("color")String color);
}
